﻿using Entity.Validation.Core;

namespace WPFEntityValidation.Entities
{
    public class Person : ValidateEntity<Person>
    {
        [ValidateField(IsRequired = true, MinLength = 0, MaxLength = 40)]
        public string FirstName { get; set; }

        [ValidateField(IsRequired = true)]
        public string LastName { get; set; }

        [ValidateField(MinLength = 0, MaxLength = 2)]
        public string MiddleName { get; set; }

        [ValidateField(IsRequired = true, IsEmail = true)]
        public string Email { get; set; }

        [ValidateField(LessThan = 60, GreaterThan = 8)]
        public int Age { get; set; }
    }
}